Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: send custom command api #360

Merged
merged 8 commits into from
Jan 28, 2021
Merged

feat: send custom command api #360

merged 8 commits into from
Jan 28, 2021

Conversation

robertsLando
Copy link
Member

Fixes #336

@coveralls
Copy link

coveralls commented Jan 27, 2021

Pull Request Test Coverage Report for Build 518571432

  • 19 of 78 (24.36%) changed or added relevant lines in 3 files are covered.
  • 33 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.3%) to 21.584%

Changes Missing Coverage Covered Lines Changed/Added Lines %
types/index.d.ts 0 1 0.0%
lib/utils.js 19 30 63.33%
lib/ZwaveClient.js 0 47 0.0%
Files with Coverage Reduction New Missed Lines %
lib/utils.js 33 46.31%
Totals Coverage Status
Change from base Build 517679755: -0.3%
Covered Lines: 2044
Relevant Lines: 9696

💛 - Coveralls

@robertsLando
Copy link
Member Author

robertsLando commented Jan 28, 2021

Example using MQTT apis and calling startLevelChange command:

Topic: zwavejs/_CLIENTS/ZWAVE_GATEWAY-<yourName>/api/sendCommand/set

Payload:

{ "args": [
  {
    "nodeId": 23,
    "commandClass": 38,
    "commandClassName": "Multilevel Switch",
    "endpoint": 0,
    "property": "targetValue"
  }, 
  "startLevelChange",
  [{} ] // this are args, in this case it could be omitted
  ]
}

@robertsLando robertsLando merged commit b60f585 into master Jan 28, 2021
@robertsLando robertsLando deleted the send-custom-commands branch January 28, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature request] add an API to execute arbitrary Z-Wave commands
2 participants